Cisco Router OSPF Design and Implementation Guide William Parkhurst, PhD, CCIE $54.95 0-07-048626-3 |
![]() ![]() |
Chapter: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
Reserve your copy at a Beta Bookstore near you! |
Contact Bet@books © 1998 The McGraw-Hill Companies, Inc. All rights reserved. Any use of this Beta Book is subject to the rules stated in the Terms of Use. |
This book is ultimately concerned with designing and configuring OSPF networks using Cisco routers. A full understanding of the issues related to an OSPF network requires knowledge of many different network technologies. At the hardware level we need to know how bridges, switches, and routers operate and what their functions are in the overall network design. We need to understand not only OSPF but also its interaction with other IP routing protocols such as RIP, IGRP and EIGRP. Local Area Network (LAN) protocols (ethernet and token ring) and Wide Area Network (WAN) protocols (Frame Relay, X.25, and ISDN) also need to be examined to better understand how to use these technologies in our network configurations and designs.
The OSI and TCP/IP Layered Network Models
The number of different network protocols that exist today inter-operate extremely well because of the adherence to a layered protocol model. The original model was developed by the OSI (figure 1.1) and was created to separate the various functions of a network. This model allows for the interaction of software modules from different vendors to coexist and operate properly as long as the published standards are followed. The physical layer deals with the electrical and mechanical specifications of a particular transport medium and associated interfaces. Physical layer examples are 10 and 100 Mbit ethernet, synchronous and asynchronous serial links, and ATM to name a few. The physical layer is concerned with getting bits, in an electrical or optical form, from point A to point B. The data link layer has the responsibility of creating frames which contain source and destination addresses, adding error detection, and possibly correction, fields to the frame and of course incorporating a users data into the frame. Protocols at the data link layer are not routable. Ethernet is an example of a data link layer protocol.
The network layer handles routing in an internet and is the most important layer as far as OSPF networks are concerned. For a protocol to be routable, the addressing scheme must include a network and a host address. Examples of routable protocols are IP, IPX, AppleTalk, and DECNet. The transport layer is used to multiplex and demultiplex data streams between upper layer application processes as seen in figure 1.2. Things become murky at the upper three layers. All seem to be involved with the user applications at layer 7 but they have nothing to do with networking so we will ignore them. In fact we will only concern ourselves with the lower four layers of the OSI model.
When an application such as telnet wants to send data, the data is sent to the TCP module at the transport layer. TCP will assign a number to the local and remote telnet session allowing TCP to determine to which session to deliver the data. IP will either receive from or deliver to the UDP or TCP module depending on the type of application. Finally, an ethernet frame contains an identifier which identifies from which network layer protocol it received the data or to which network layer protocol it is to deliver the data. To illustrate the interaction between the different layers in the OSI model we will follow the flow of data from one host to another (figure 1.3). Assume we are running a telnet session between two hosts. User data is generated at the application layers and passed down the protocol stack to the TCP module in the transport layer. The TCP layer will use an identifier for the session, which is contained in the TCP header, and pass the TCP
segment to the IP module at the network layer. IP only needs to tag the packet as a TCP or UDP packet. When the packet is received at the data link layer, an ethernet frame is constructed with an ethernet header and trailer. The header, among other things, contains a field tagging the frame as one that carries IP data. Finally, the frame is passed to the physical layer for transmission onto the network media. The details of the protocols mentioned in this example will be examined in greater detail in later chapters. For now we only need to understand the concepts behind the layered model and the encapsulation and de-encapsulation of data as it passes up and down the protocol stack.
When the ethernet frame is received by the remote host the data link ethernet module will strip off the ethernet header and trailer after determining that this frame carries IP data and pass the data to the IP module at the network layer. IP will determine if the packet is a TCP or UDP packet and pass it to the appropriate module at the transport layer. Finally, TCP will extract the user data and send it to the proper user process.
Bridges
Ethernet is a shared media technology. This means that every node on an ethernet segment will receive every frame that is transmitted by any host. The physical layer will receive the frame and examine the destination address contained within the frame. If the address matches the address of the host, or if the frame is an ethernet broadcast, the physical layer will pass the frame to the data link layer for further processing. As the number of hosts on an ethernet segment increases, so does the amount of traffic that each host will need to process, even if the traffic is not intended for that host. Shared media also means that only one host at a time can send traffic. An ethernet segment with many hosts will start to introduce significant traffic delays and can eventually reach the point where the network is unusable. A bridge is a device that operates at layer 2, data link layer, of the OSI model for the purpose of reducing the amount of traffic that ethernet hosts have to deal with on a particular segment. Traffic reduction is achieved by segmenting a large ethernet segment into smaller segments. Figure 1.4 is an unsegmented ethernet network containing 100 hosts and figure 1.5 is a bridged ethernet network containing 4 segments of 25 hosts each. A bridge will forward ethernet frames between segments only if the traffic is destined for a host on that segment. How does the bridge know when to forward frames? Initially a bridge does not know which hosts are on which segments so all frames are initially forwarded to all segments. When a bridge receives the first frame transmitted by a host it learns the address of the host, which is contained in the frame, and the segment on which the frame was received. The bridge does not know the location of the intended recipient, so it forwards the frame on all segments except on the segment on which the frame was received (figure 1.6). Assume the host with address 75 is sending a frame to the host with address 51. When the bridge receives the frame it will learn that address 75 is on segment 3. The bridge knows that the destination is address 51 but does not know on which segment to find this
address so the frame is forwarded onto the remaining three segments. The bridge learns host address by using a bridging table similar to the one in table 1.1.
Table 1.1. Bridging Table
Segment |
Host Address |
3 |
75 |
Now host 26 sends a frame to host 75. The bridge consults the bridging table and sees that host 25 is on segment 3 so the frame is forwarded to segment 3 but not segments 1 and 4. The bridge also learns that host 26 is on segment 2 and adds this entry to the bridging table (Table 1.2).
Table 1.2. Modified Bridging Table
Segment |
Host Address |
3 |
75 |
2 |
26 |
Eventually the bridge will learn the location of every host and will have a complete bridging table (table 1.3).
Table 1.2. Complete Bridging Table
Segment |
Host Address |
1 |
1-25 |
2 |
26-50 |
3 |
51-75 |
4 |
75-100 |
What if we physically move a host from one segment to another? When the moved host transmits a frame, the bridge will learn which segment it is on. The bridging table will be checked to see if there is an entry for this host. The bridge will find an entry and notice that the entry does not agree with the segment from where the frame was received. The bridge will remove the old entry and replace it with the new entry. Before the moved host transmits, any frame sent to that host will not reach the host since the entry in the bridging table contains old data. Until the moved host sends a frame, it will not be able to receive any frames sent to it. These examples demonstrate that bridges do reduce traffic on ethernet segments but they cannot reduce broadcast traffic. An ethernet broadcast is a frame that is addressed to all hosts. Bridges are required to forward broadcast traffic onto all attached segments. Many times broadcast traffic can be very high and bridges will not help us but routers can, as we will discover soon.
Bridges are essentially transparent devices. A bridge will not alter the source or destination address of an ethernet frame but will only forward traffic onto the appropriate segment. Bridges are not totally transparent because they do introduce a delay in inter-segment traffic flow. A bridge must buffer every frame, determine if the frame is to be forwarded onto another segment, wait until the segment if free of traffic, and then transmit the frame. This buffering and forwarding process introduces a finite amount of delay into the transmission time of inter-segment packets. Also, if the buffer capabilities of the bridge are not adequate the possibility exists that the bridge may begin to discard frames until the overload subsides. Data encapsulation and de-encapsulation for an ethernet bridge is shown in figure 1.7.
What happens if the bridge fails? Hosts on the same segment will be able to communicate, but inter-segment communication will be impossible. The solution is to design redundancy into the network by using multiple bridges as shown in figure 1.8.
If bridge A fails then inter-segment traffic can still occur through bridge B. Do you see any problems with this configuration? Assume a host on segment 1 transmits a frame (we don’t care what the destination is). Both bridges receive the frame and learn that the transmitting host is on segment 1. The bridges do not know the segment for the destination host, so they both forward the frame onto segment 2. Bridge A receives the frame transmitted by bridge B and learns that the transmitting host is on segment 2! The same thing happens when bridge B receives the frame that was forwarded by bridge A. Neither bridge knows the segment of the destination host, so they forward the frame back onto segment 1 and round and round she goes. We have an infinite routing loop that will continue until we turn off one of the bridges. Great design! Well it is, but we need to add sophistication to prevent these nasty bridging loops. The loop is broken by putting one of the bridges in standby mode and leaving it there until the other bridge fails. If one of the bridges fail, the other can take offer and keep traffic flowing. We could do this manually but an automatic method would be better, especially if we have a large number of bridges in our network.
IEEE 802.1 Spanning Tree Protocol
The IEEE 802.1 Spanning Tree Protocol was developed to allow a bridged network to discover a loop-free topology. This loop-free topology is a tree-like structure that spans every segment of the network, hence the name Spanning Tree. Consider the five-segment bridged ethernet network of figure 1.9. This network contains multiple bridging loops, which would be disastrous if we ever turned on the bridges. The bridges do us no good if they are off so we need a method the break the routing loops and still maintain our redundant, fault tolerant design. If selected interfaces on certain bridges enter into a standby mode (no frame forwarding occurs) then a loop free spanning tree would be formed which still connects all the segments and contains no loops (figure 1.10).
The bridge interfaces with an X over them have entered standby mode. These standby interfaces will only be placed into active mode when one or more active bridge interfaces fail and connectivity between segments is lost. How is all this accomplished? Bridges must talk to each other using Bridge Protocol Data units (BPDU) to learn the network topology and to decide which interfaces will be active and which interfaces will enter the standby mode.
Switches
A switch is a layer two device and is essentially a fast bridge. While bridges buffer frames and then use software to determine whether or not to forward a frame to a segment, a switch bridges frames using hardware, therefore making a switch must faster than a bridge. Also, a switch usually has a multi-path backplane or switching fabric that is used to switch frames between multiple segments simultaneously.
Routers
A router operates at layer three, the network layer, of the OSI model. The flow of data in a routed network is shown in figure 1.11.
When a router receives an ethernet frame the ethernet header will be examined to see if the packet is addresses to the router. If the packet is meant for the router, the router will strip off the ethernet header from the frame, and pass the remaining potion of the packet up to the indicated protocol in the ethernet header. In this case, the IP layer will examine the IP destination address to determine out which router interface to send the packet. The router will re-encapsulate the IP packet into an ethernet frame and send the frame on its way to host 2. The router bases the routing decision on the network address of the destination host. When the ethernet frame arrives at host 2, the ethernet card will examine the destination address in the ethernet header to determine if the frame is meant for host 2. If the ethernet address of host 2 matches the destination address in the frame, the datalink layer (layer 2) will pass the frame to the appropriate network layer process, in this case the IP process. The IP process will determine in the packets is meant for UDP or TCP at layer 4. UDP or TCP determine which user process to send the data. Finally the user process will receive the data.
Routers can simultaneously run multiple routing processes if multiple routing protocols are being used. On some links we may want to run only one routing protocol, usually IP. Non-IP traffic (IPX, AppleTalk) that needs to cross the IP only link would need to be tunneled across the link in an IP tunnel as shown in figure 1.12.
Notice that tunneling involves encapsulating a layer three protocol such as IPX in another layer three protocol, IP. The IPX packet becomes the data in the IP packet and is tunneled across the IP only link between the routers. When the packet reaches the other side of the link, the IPX packet is extracted from the IP packet and encapsulated in an ethernet frame to be sent to the Netware client.
![]() ![]() Chapter: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
Reserve your copy at a Beta Bookstore near you! |
Contact Bet@books © 1998 The McGraw-Hill Companies, Inc. All rights reserved. Any use of this Beta Book is subject to the rules stated in the Terms of Use. |